
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
%>


<div class="mt-20">
    <table class="table table-border table-bordered table-hover table-bg table-sort">
        <thead>
        <tr class="text-c">
            <th width="80">ID</th>
            <th width="100">用户名</th>
            <th width="90">手机</th>
            <th width="150">邮箱</th>
            <th width="130">注册时间</th>
            <th width="70">文章数量</th>
            <th width="70">回答数量</th>
            <th width="70">状态</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${requestScope.userinfos}" var="userinfo">
            <tr class="text-c">
                <td> ${userinfo.id}</td>
                <td><u style="cursor:pointer" class="text-primary">
                        ${userinfo.nickname}
                </u></td>
                <td>${userinfo.phoneNumber}</td>
                <td>${userinfo.email}</td>
                <td>${userinfo.inputTime}</td>
                <td>${userinfo.publishCount}</td>
                <td>${userinfo.answerCount}</td>
                <c:if test="${userinfo.vipChecked eq 1 }">
                    <td class="td-status">
                        <span class="label radius">待审核</span>
                    </td>
                    <td class="f-14 td-manage" id="${userinfo.id}">
                        <a style="text-decoration:none" onClick="article_shenhe(this,'10001')" href="javascript:;" title="审核">审核</a>
                    </td>
                </c:if>
                <c:if test="${userinfo.vipChecked eq 0}">
                    <td class="td-status">
                        <span class="label label-success radius">已通过</span>
                    </td>
                    <td class="f-14 td-manage" id="${userinfo.id}">
                        <a class="c-primary" onClick="article_stop(this,id)" href="javascript:;" title="审核通过">取消通过</a>
                    </td>
                </c:if>
                <c:if test="${userinfo.vipChecked eq 2}">
                    <td class="td-status">
                        <span class="label label-danger radius">未通过</span>
                    </td>
                    <td class="f-14 td-manage" id="${userinfo.id}">
                        <a class="c-primary" onClick="article_start(this,id)" href="javascript:;" title="审核未通过">通过</a>
                    </td>
                </c:if>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>



<!--请在下方写此页面业务相关的脚本-->



<script type="text/javascript">
    $(function(){
        $('.table-sort').dataTable({
            "aaSorting": [[ 1, "desc" ]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable":false,"aTargets":[1,2,3]}// 制定列不参与排序
            ]
        });
    });

</script>